New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: deprecated decorator wasn't returning the value of the moved cal… #678
Conversation
…lable. Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Great catch! Hm, so this affects functions we are not using internally anymore, but it might have led to errors in other people's code, who have been using them, correct? Something that easily slips your own testing, of course, if you're not using them anymore :/ In my eyes, maybe the scheduling ones have a small likelihood that this actually happened. |
In that case, we might want to add this to version 0.13.1. @Flix6x knows how that works. |
That's correct, this affects external code.
yes, we have 😞, see here. |
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
…e of the moved cal… (#678) * fix: deprecated decorator wasn't returning the value of the moved callable. Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix: update test to check that the decorator is returning Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * docs: add changelog entry Signed-off-by: Victor Garcia Reolid <victor@seita.nl> --------- Signed-off-by: Victor Garcia Reolid <victor@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl>
While trying to the decorator
@deprecated
to refactor a function signature, I realized that is not returning the value of the function, just calling it.This bug affects the following functions:
flexmeasures.data.queries.data_sources:get_or_create_source
flexmeasures.data.queries.data_sources:get_source_or_none
flexmeasures.data.services.asset_grouping:get_asset_group_queries
and methods:
flexmeasures.data.models.planning:Scheduler.compute_schedule
flexmeasures.data.models.planning:storage:StorageScheduler.compute_schedule
This is specially concerning for code extending from
Scheduler
.